Skip to content

Options to enable configuring install for lower idle CPU.#160

Open
naturedamends wants to merge 6 commits intoDokploy:mainfrom
naturedamends:feature/install-health
Open

Options to enable configuring install for lower idle CPU.#160
naturedamends wants to merge 6 commits intoDokploy:mainfrom
naturedamends:feature/install-health

Conversation

@naturedamends
Copy link
Copy Markdown

@naturedamends naturedamends commented Apr 22, 2026

  • Allow redis polling to be reduced via hz option
  • Allow configuring dokploy server health check options - turning them off.

I am trying to reduce idle CPU usage. Dokpoly is using 2 percent ish on my low powered device.
I would like an option to remove redis, and postgres,, but postgres ..

I'm not bothered about delth checks

this allows keeping them, turning them off, and configuring the values

HEALTH_CMD=none sh install.sh`

Greptile Summary

This PR adds two install-time options to reduce idle CPU: a REDIS_HZ env var to lower the Redis polling frequency, and a family of HEALTH_* env vars (HEALTH_CMD=none being the primary advertised use case) to configure or disable Docker health checks on the dokploy service.

  • HEALTH_CMD=none combined with any HEALTH_INTERVAL/HEALTH_TIMEOUT/HEALTH_RETRIES/HEALTH_START_PERIOD variable will produce --no-healthcheck --health-interval …, which Docker rejects; the timing checks need to be gated on HEALTH_CMD != "none".

Confidence Score: 4/5

Safe to merge once the --no-healthcheck / health-timing conflict is resolved.

One P1 defect: Docker rejects --no-healthcheck alongside --health-interval/--health-timeout/etc., which can occur with a plausible user configuration. The P2 (unconditional redis-server command) is low-risk given Redis 7's default CMD, and the fix is straightforward.

apps/website/public/install.sh — specifically the HEALTH_EXTRA_OPTS construction block (lines 277–286) and the redis_args initialization (line 253).

Comments Outside Diff (1)

  1. apps/website/public/install.sh, line 310 (link)

    P2 Health options shared between dokploy and Traefik containers

    $HEALTH_EXTRA_OPTS is applied to the Traefik docker run call here in addition to the docker service create for dokploy. If the intent is only to reduce CPU for the dokploy container, Traefik's health checks are being altered as a side-effect. If both are intentional, consider documenting this behaviour so future readers know it's by design.

Reviews (2): Last reviewed commit: "Add no args redis command." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Comment thread apps/website/public/install.sh Outdated
Comment thread apps/website/public/install.sh
@naturedamends naturedamends changed the title Enable configuring the health checks. Options to enable configuring install for lower idle CPU. Apr 22, 2026
Comment on lines +278 to +286
if [ "$HEALTH_CMD" = "none" ]; then
HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --no-healthcheck"
elif [ -n "$HEALTH_CMD" ]; then
HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-cmd $HEALTH_CMD"
fi
[ -n "$HEALTH_INTERVAL" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-interval $HEALTH_INTERVAL"
[ -n "$HEALTH_TIMEOUT" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-timeout $HEALTH_TIMEOUT"
[ -n "$HEALTH_RETRIES" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-retries $HEALTH_RETRIES"
[ -n "$HEALTH_START_PERIOD" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-start-period $HEALTH_START_PERIOD"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 --no-healthcheck combined with health timing flags causes a Docker error

When HEALTH_CMD=none is set alongside any timing variable (e.g. HEALTH_INTERVAL=30s), the resulting flags are --no-healthcheck --health-interval 30s. Docker rejects this combination — --no-healthcheck and --health-* options are mutually exclusive. The health timing checks on lines 283-286 run unconditionally, so the conflict can arise silently from a plausible user configuration.

Add a guard so timing options are only appended when HEALTH_CMD is not "none":

HEALTH_EXTRA_OPTS=""
if [ "$HEALTH_CMD" = "none" ]; then
    HEALTH_EXTRA_OPTS="--no-healthcheck"
else
    if [ -n "$HEALTH_CMD" ]; then
        HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-cmd $HEALTH_CMD"
    fi
    [ -n "$HEALTH_INTERVAL" ]    && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-interval $HEALTH_INTERVAL"
    [ -n "$HEALTH_TIMEOUT" ]     && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-timeout $HEALTH_TIMEOUT"
    [ -n "$HEALTH_RETRIES" ]     && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-retries $HEALTH_RETRIES"
    [ -n "$HEALTH_START_PERIOD" ] && HEALTH_EXTRA_OPTS="$HEALTH_EXTRA_OPTS --health-start-period $HEALTH_START_PERIOD"
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant